package com.ecole.mines.emargement;

import com.ecole.mines.model.Promotion;

import android.app.Fragment;
import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.TextView;

public class FragmentInformationsTop extends Fragment {
	
	private TextView t;
	private TextView tClasse;
	
	@Override
	public View onCreateView(LayoutInflater inflater, ViewGroup container,
			Bundle savedInstanceState) {
		View view = inflater.inflate(
				R.layout.activity_fragment_informations_top, container, false);

		this.t = new TextView(getActivity());
		t = (TextView) view.findViewById(R.id.tvInfoTop);
		t.setText("INFRES5 - Etudes et Développement - Anglais");

		this.tClasse = new TextView(getActivity());
		tClasse = (TextView) view.findViewById(R.id.tvInfoTopClasse);
		tClasse.setText("5-156");

		float size = 20;
		t.setTextSize(size);
		tClasse.setTextSize(size);

		return view;
	}

	public void majInfo(Promotion promotion) {

		this.t.setText(promotion.getName()+" - "+promotion.getCours().get(0).getNom());
		this.tClasse.setText(promotion.getCours().get(0).getSalle());
	}

}
